<?php
class LocationController extends CI_Controller {
	function __construct() {
		parent::__construct ();
		$this->load->model ( 'location', '', TRUE );
			}
	function getLocation() {
		$id_Location = $_POST ['id_Location'];
		
		$query = $this->location->getLocation2 ( $id_Location );
		if($query)
		print (json_encode ( $query )) ;
	}
	function getMinDistance() {
		$crrLatitude = $_POST ['lat'];
		$crrLongtitude = $_POST ['longi'];
		$result = $this->location->getDistance ( $crrLatitude, $crrLongtitude, 1 );
		print (json_encode ( $result )) ;
	}

}